package com.ld.security.common.quartz.modules.job.entity;

import com.ld.security.common.mybatis.anno.LabelKey;
import com.ld.security.common.mybatis.anno.LabelKeys;
import com.ld.security.common.mybatis.base.entity.*;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;


import com.ld.security.common.quartz.modules.job.constant.JobLogConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import com.ld.security.common.mybatis.anno.SqlKey;
import com.ld.security.common.core.base.column.*;
import com.ld.security.common.mybatis.constant.SqlCondition;

@TableName("job_log")
@ApiModel("作业日志")
@Data
public class JobLogEntity  extends SuperEntity implements LabelMap
{

  @ApiModelProperty("日志类型")
  @SqlKey(SqlCondition.eq)
  private JobLogConstant.logType logType;

  @ApiModelProperty("任务编号")
  @SqlKey(SqlCondition.eq)
  @LabelKeys(value = JobTaskEntity.class,
  labels = {
          @LabelKey(targetKey = "taskName",sourceKey = "jobName")
  }
  )
    private String taskId;



  @ApiModelProperty("任务组编号")
  @SqlKey(SqlCondition.eq)
  @LabelKeys(value = JobGroupEntity.class,
          labels = {
                  @LabelKey(targetKey = "groupName",sourceKey = "label")
          }
  )
    private String groupId;


  @ApiModelProperty("任务名")
  @SqlKey(SqlCondition.eq)
  private String taskName;

  @ApiModelProperty("任务组名")
  @SqlKey(SqlCondition.eq)
  private String groupName;




  @ApiModelProperty("日志内容")
  @SqlKey(SqlCondition.eq)
    private String content;


  @ApiModelProperty("运行参数")
  private ListJson config;

  @ApiModelProperty("虚拟列")
  private MapJson labelMap;



        }
